/* 简化合并面板样式 */
.panel {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 600px;
  max-width: 90vw;
  max-height: 80vh;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  background: linear-gradient(135deg, #52c41a 0%, #389e0d 100%);
  color: white;
}

.title {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
}

.closeButton {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  transition: background-color 0.2s ease;
}

.closeButton:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* 统计信息 */
.stats {
  display: flex;
  justify-content: space-around;
  padding: 16px 24px;
  background: #f6ffed;
  border-bottom: 1px solid #d9f7be;
}

.statItem {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.statNumber {
  font-size: 24px;
  font-weight: 700;
  color: #52c41a;
}

.statLabel {
  font-size: 12px;
  color: #6c757d;
  font-weight: 500;
}

/* 合并操作区域 */
.mergeSection {
  padding: 20px 24px;
  background: #f0f9ff;
  border-bottom: 1px solid #bae6fd;
}

.mergeSection h4 {
  margin: 0 0 12px 0;
  color: #0369a1;
  font-size: 14px;
}

.inputGroup {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.input {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 13px;
  transition: border-color 0.2s ease;
}

.input:focus {
  outline: none;
  border-color: #52c41a;
  box-shadow: 0 0 0 2px rgba(82, 196, 26, 0.1);
}

.mergeButton {
  background: #52c41a;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.mergeButton:hover {
  background: #389e0d;
  transform: translateY(-1px);
}

/* 合并块列表 */
.blocksList {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px;
}

.listHeader {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.listHeader h4 {
  margin: 0;
  color: #333;
  font-size: 16px;
}

.clearAllButton {
  background: #ff4d4f;
  color: white;
  border: none;
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.clearAllButton:hover {
  background: #d32f2f;
}

.blockCard {
  background: #ffffff;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 12px;
  transition: all 0.2s ease;
}

.blockCard:hover {
  border-color: #52c41a;
  box-shadow: 0 2px 8px rgba(82, 196, 26, 0.1);
}

/* 显示模式 */
.displayMode {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.blockHeader {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.blockTitle {
  display: flex;
  align-items: center;
  gap: 8px;
}

.blockTitle strong {
  color: #333;
  font-size: 14px;
}

.duration {
  background: #52c41a;
  color: white;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
}

.blockActions {
  display: flex;
  gap: 4px;
}

.editButton {
  background: #faad14;
  color: white;
  border: none;
  width: 28px;
  height: 28px;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  transition: all 0.2s ease;
}

.editButton:hover {
  background: #d48806;
}

.splitButton {
  background: #ff4d4f;
  color: white;
  border: none;
  width: 28px;
  height: 28px;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  transition: all 0.2s ease;
}

.splitButton:hover {
  background: #d32f2f;
}

.blockDetails {
  margin: 0;
}

.blockDetails p {
  margin: 0 0 4px 0;
  font-size: 13px;
  color: #555;
}

/* 编辑模式 */
.editMode {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.blockInfo {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.blockInfo strong {
  color: #333;
  font-size: 14px;
}

.blockInfo span {
  color: #666;
  font-size: 12px;
}

.editInputs {
  display: flex;
  gap: 8px;
}

.editInput {
  flex: 1;
  padding: 6px 10px;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  font-size: 12px;
}

.editInput:focus {
  outline: none;
  border-color: #52c41a;
  box-shadow: 0 0 0 2px rgba(82, 196, 26, 0.1);
}

.editActions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.saveButton {
  background: #52c41a;
  color: white;
  border: none;
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.saveButton:hover {
  background: #389e0d;
}

.cancelButton {
  background: #f5f5f5;
  color: #666;
  border: 1px solid #d9d9d9;
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.cancelButton:hover {
  background: #e6f7ff;
  border-color: #2196f3;
  color: #2196f3;
}

/* 空状态 */
.emptyState {
  padding: 40px 20px;
  text-align: center;
  color: #6c757d;
}

.emptyState p {
  margin: 0 0 8px 0;
  font-size: 14px;
}

.emptyState p:first-child {
  font-size: 16px;
  font-weight: 600;
  color: #52c41a;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .panel {
    width: 95vw;
    max-height: 90vh;
  }
  
  .inputGroup,
  .editInputs {
    flex-direction: column;
  }
  
  .blockHeader {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  
  .blockActions {
    align-self: flex-end;
  }
}

